<?php
/**
 * 排行榜
 */
$redis = new redis();
$redis->connect('127.0.0.1', 6379);
$key = 'zset1';
$redis->del($key);
foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $char) {
    $redis->zAdd($key, 0, $char);
}
$data['zrevrange(key, start,end, withscore=true)'] = $redis->zrevrange($key, 0, 4, true);
$data["zCard"] = $redis->zCard($key);
print_r($data);

